package com.example.questionnaire.util;

import com.example.questionnaire.QuestionnaireApplication;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

import javax.sql.DataSource;
import java.sql.SQLException;

@SpringBootTest(classes = QuestionnaireApplication.class)
@RunWith(SpringRunner.class)
public class InitTest {
    @Autowired
    private DataSource dataSource;

    @Test
    public void testDataSource() throws SQLException {

        System.out.println(dataSource.getConnection());
    }

}
